<?php namespace module\news;
class Process{
    public function handler($kid){
        $data = Db::table( 'reply_news' )->where( 'kid', $kid )->get();
        $reply=[];
        foreach($data as $k => $v){
            $res['Title']=$v['title'];
            $res['Description']=$v['description'];
            $res['PicUrl']=__ROOT__.'/'.$v['thumb'];
            if(empty($v['url'])){
                $res['Url']= web_url('site/show','news',['id'=>$v['id']]);
            }else{
                $res['Url']=$v['url'];
            }
            $reply[]=$res;
        }
        Wx::instance( 'message' )->news($reply);
    }
}